import {requestService} from '/src/utils/request'

//查询协议模板列表
export function getAgreementModelList(query) {
    return requestService({
        url: '/xiaozhen-system/cmdbModel/selectCmdbModelList',
        method: 'get',
        params: query
    })
}

//添加协议模板
export function addAgreementModel(data) {
    return requestService({
        url: '/xiaozhen-system/cmdbModel/addCmdbModel',
        method: 'post',
        data: data
    })
}

//修改协议模板
export function updateAgreementModel(data) {
    return requestService({
        url: '/xiaozhen-system/cmdbModel/updateCmdbModel',
        method: 'put',
        data: data
    })
}

//删除协议模板
export function deleteAgreementModel(modelId) {
    return requestService({
        url: '/xiaozhen-system/cmdbModel/' + modelId,
        method: 'delete'
    })
}

//添加或修改协议属性信息
export function addAgreementAttributes(data) {
    return requestService({
        url: '/xiaozhen-system/cmdbModelAttribute/addCmdbModelAttributes',
        method: 'post',
        data: data
    })
}

//查询协议属性列表
export function getAgreementAttributeList(modelId) {
    return requestService({
        url: '/xiaozhen-system/cmdbModelAttribute/selectCmdbModelAttributesByModelId/' + modelId,
        method: 'get'
    })
}

